{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter03\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGdCAYAAADAAnMpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAji0lEQVR4nO3df3BTVf7/8VcKNAVsAgy25Uf4obD8EAGtAinrIk6xH2SQ/iXD7lB0AEctO2J316X+qsJqGBUXZxdBRKy7LhRBC4oIIloZhroItDPgD3ZYhKKSoqMkbdQWmvv9o18CXVrs7a+TtM/HzJ30np6T+84ZIC/OvblxWJZlCQAAwJA40wUAAICOjTACAACMIowAAACjCCMAAMAowggAADCKMAIAAIwijAAAAKMIIwAAwKjOpgtojHA4rG+++UaJiYlyOBymywEAAI1gWZYqKirUt29fxcU1vP4RE2Hkm2++kcfjMV0GAABogpMnT6p///4N/j4mwkhiYqKk2hfjcrkMVwMAABojGAzK4/FE3scbEhNh5PypGZfLRRgBACDG/NIlFlzACgAAjCKMAAAAowgjAADAKMIIAAAwijACAACMIowAAACjCCMAAMAowggAADCKMAIAAIyyFUZWrlyp0aNHR+6E6vV69e677zbYPz8/Xw6Ho86WkJDQ7KIRPULVITmecMjxhEOh6pDpcgAAMcjW7eD79++vpUuXaujQobIsS6+++qpmzJihkpISXXPNNfWOcblcOnLkSGSfb90FAAAXsxVGpk+fXmf/ySef1MqVK/Xxxx83GEYcDodSUlKaXiGi0vlVkNDZC6shF//cPb57m9cEAIhNTf6ivJqaGm3cuFGhUEher7fBfpWVlRo4cKDC4bCuv/56PfXUUw0Gl/OqqqpUVVUV2Q8Gg00tE63kCt8Vl7QlP5sc+dnKs9qyHABADLN9AeuhQ4d0xRVXyOl06p577lFhYaF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qVFBQoFAoJK/XW2+f4uJipaen12nLyMhQcXHxZZ+7qqpKwWCwzgYAANon22Hk0KFDuuKKK+R0OnXPPfeosLBQI0eOrLev3+9XcnJynbbk5GT5/f7LHsPn88ntdkc2j8djt0wAABAjbIeRYcOGqbS0VP/+97917733as6cOfrss89atKjc3FwFAoHIdvLkyRZ9fgAAED062x0QHx+vIUOGSJJSU1P1ySef6Pnnn9eLL754Sd+UlBSVl5fXaSsvL1dKSsplj+F0OuV0Ou2WBgAAYlCz7zMSDodVVVVV7++8Xq927dpVp23nzp0NXmMCAAA6HlsrI7m5uZo6daoGDBigiooKrVu3TkVFRdqxY4ckKSsrS/369ZPP55Mk3X///Zo0aZKWLVumadOmqaCgQPv379fq1atb/pUAAICYZCuMnD59WllZWTp16pTcbrdGjx6tHTt2aMqUKZKksrIyxcVdWGxJS0vTunXr9Mgjj+ihhx7S0KFDtXnzZo0aNaplXwUAAIhZzb7PSFvgPiMAAMSeVr/PCAAAQEsgjAAAAKMIIwAAwCjCCAAAMIowAgAAjCKMAAAAowgjAADAKMIIAAAwijACAACMIowAAACjCCMAAMAowggAADCKMAIAAIwijAAAAKMIIwAAwCjCCAAAMIowAgAAjCKMAAAAowgjAADAKMIIAAAwijACAACMIowAAACjCCMAAMAowggAADCKMAIAAIwijAAAAKMIIwAAwCjCCAAAMIowAgAAjCKMAAAAowgjAADAKMIIAAAwijACAACMIowAAACjCCMAAMAowggAADCKMAIAAIwijAAAAKNshRGfz6cbb7xRiYmJSkpKUmZmpo4cOXLZMfn5+XI4HHW2hISEZhUNAADaD1th5KOPPlJ2drY+/vhj7dy5U2fPntWtt96qUCh02XEul0unTp2KbCdOnGhW0QAAoP3obKfz9u3b6+zn5+crKSlJBw4c0G9+85sGxzkcDqWkpDStQgAA0K4165qRQCAgSerVq9dl+1VWVmrgwIHyeDyaMWOGPv3008v2r6qqUjAYrLMBAID2qclhJBwOa+HChZo4caJGjRrVYL9hw4Zp7dq12rJli1577TWFw2GlpaXpq6++anCMz+eT2+2ObB6Pp6llAgCAKOewLMtqysB7771X7777rvbs2aP+/fs3etzZs2c1YsQIzZo1S0uWLKm3T1VVlaqqqiL7wWBQHo9HgUBALperKeUCAIA2FgwG5Xa7f/H929Y1I+ctWLBAW7du1e7du20FEUnq0qWLrrvuOh09erTBPk6nU06nsymlAQCAGGPrNI1lWVqwYIEKCwv1wQcfaPDgwbYPWFNTo0OHDqlPnz62xwIAgPbH1spIdna21q1bpy1btigxMVF+v1+S5Ha71bVrV0lSVlaW+vXrJ5/PJ0lavHixJkyYoCFDhujMmTN65plndOLECc2bN6+FXwoAAIhFtsLIypUrJUk333xznfZXXnlFd955pySprKxMcXEXFlx++OEHzZ8/X36/Xz179lRqaqr27t2rkSNHNq9yAADQLjT5Ata21NgLYAAAQPRo7Ps3300DAACMIowAAACjCCMAAMAowggAADCKMAIAAIwijAAAAKMIIwAAwCjCCAAAMIowAgAAjCKMAAAAowgjAADAKMIIAAAwijACAACMIowAAACjCCMAAMAowggAADCKMAIAAIwijAAAAKMIIwAAwCjCCAAAMIowAgAAjCKMAAAAowgjAADAKMIIAAAwijACAACMIowAAACjCCMAAMAowggAADCKMAIAAIwijAAAAKMIIwAAwCjCCAAAMIowAgAAjCKMAAAAowgjAADAKMIIAAAwijACAACMIowAAACjCCMAgNhkWVJRUe0jYpqtMOLz+XTjjTcqMTFRSUlJyszM1JEjR35x3MaNGzV8+HAlJCTo2muv1bZt25pcMAAAkqTt26XJk6UdO0xXgmayFUY++ugjZWdn6+OPP9bOnTt19uxZ3XrrrQqFQg2O2bt3r2bNmqW5c+eqpKREmZmZyszM1OHDh5tdPACgA9u0qe4jYpbDspq+vvXtt98qKSlJH330kX7zm9/U22fmzJkKhULaunVrpG3ChAkaO3asVq1a1ajjBINBud1uBQIBuVyuppYLAIhl4bC0cqV05kzt/tNPS8Gg5HZLf/pTbVuPHtK990pxXIUQDRr7/t25OQcJBAKSpF69ejXYp7i4WDk5OXXaMjIytHnz5gbHVFVVqaqqKrIfDAab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AADAKMIIAAAwijASBVasWKFBgwYpISFB48eP1759+xrs+9JLL+mmm25Sz5491bNnT6Wnp1+2f0diZx4vVlBQIIfDoczMzNYtMEbYncczZ84oOztbffr0kdPp1K9+9Stt27atjaqNXnbncfny5Ro2bJi6du0qj8ejBx54QD///HMbVRuddu/erenTp6tv375yOBzavHnzL44pKirS9ddfL6fTqSFDhig/P7/V64x2dufxzTff1JQpU3TllVfK5XLJ6/Vqx44drVojYcSwDRs2KCcnR3l5eTp48KDGjBmjjIwMnT59ut7+RUVFmjVrlj788EMVFxfL4/Ho1ltv1ddff93GlUcXu/N43vHjx/XHP/5RN910UxtVGt3szmN1dbWmTJmi48ePa9OmTTpy5Iheeukl9evXr40rjy5253HdunVatGiR8vLy9Pnnn+vll1/Whg0b9NBDD7Vx5dElFAppzJgxWrFiRaP6f/nll5o2bZomT56s0tJSLVy4UPPmzWv1N9JoZ3ced+/erSlTpmjbtm06cOCAJk+erOnTp6ukpKT1irRg1Lhx46zs7OzIfk1NjdW3b1/L5/M1avy5c+esxMRE69VXX22tEmNCU+bx3LlzVlpamrVmzRprzpw51owZM9qg0uhmdx5XrlxpXXXVVVZ1dXVblRgT7M5jdna2dcstt9Rpy8nJsSZOnNiqdcYSSVZhYeFl+zz44IPWNddcU6dt5syZVkZGRitWFlsaM4/1GTlypPXEE0+0fEH/HysjBlVXV+vAgQNKT0+PtMXFxSk9PV3FxcWNeo4ff/xRZ8+eVa9evVqrzKjX1HlcvHixkpKSNHfu3LYoM+o1ZR7feusteb1eZWdnKzk5WaNGjdJTTz2lmpqatio76jRlHtPS0nTgwIHIqZxjx45p27Ztuu2229qk5vaiuLi4zrxLUkZGRqP/PUX9wuGwKioqWvV9Jia+KK+9+u6771RTU6Pk5OQ67cnJyfriiy8a9Rx//vOf1bdv30v+AnYkTZnHPXv26OWXX1ZpaWkbVBgbmjKPx44d0wcffKDf/e532rZtm44ePar77rtPZ8+eVV5eXluUHXWaMo+//e1v9d133+nXv/61LMvSuXPndM8993T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EiyPx2Pdd9991g8//ND2hUeRDz/8sN5/787P3Zw5c6xJkyZdMmbs2LFWfHy8ddVVV1mvvPJKm9cdbezO46RJky7bvzU4LIs1QAAAYA7XjAAAAKMIIwAAwCjCCAAAMIowAgAAjCKMAAAAowgjAADAKMIIAAAwijACAACMIowAAACjCCMAAMAowggAADCKMAIAAIz6f1iM/8OWZyTjAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "##给出训练数据以及对应的类别\n",
    "def createDataSet():\n",
    "    group = np.array([[1.0,2.0],[1.2,0.1],[0.1,1.4],[0.3,3.5],[1.1,1.0],[0.5,1.5]])\n",
    "    labels = np.array(['A','A','B','B','A','B'])\n",
    "    return group,labels\n",
    "if __name__=='__main__':\n",
    "    group,labels = createDataSet()\n",
    "    plt.scatter(group[labels=='A',0],group[labels=='A',1],color = 'r', marker='*')#对于类别为A的数据集我们使用红色六角形表示\n",
    "    plt.scatter(group[labels=='B',0],group[labels=='B',1],color = 'g', marker='+')#对于类别为B的数据集我们使用绿色十字形表示\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ True,  True, False, False,  True, False])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "group,labels = createDataSet()\n",
    "# group[labels=='A',0]\n",
    "labels == 'A'\n"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 验证数组嵌套数据的场景\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "a = np.array([0,2,3,4])\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "yolov7",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.16"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
